package com.dd.cloud.user.entity.goods;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author xt
 */
@Data
@EqualsAndHashCode
@Accessors(chain = true)
@Table(comment = "商品积分兑换表")
public class GoodsExchange {

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Column(isKey = true, isAutoIncrement = true)
    private Integer id;

    /**
     * 商品类型
     */
    @Column(comment ="商品类型 1.现金 2.话费 3.会员卡",length = 4)
    private Integer type;

    /**
     * 商品名称
     */
    @Column(comment = "商品名称",length = 32)
    private String name;

    /**
     * 商品图片
     */
    @Column(comment = "商品图片")
    private String imgUrl;

    /**
     * 商品价格
     */
    @Column(comment = "价格")
    private Integer price;

    /**
     * 消耗积分
     */
    @Column(comment = "消耗积分")
    private Integer integral;

    /**
     *上架/下架
     */
    @Column(comment = "0.下架,1.上架")
    private Integer isShow;


    /**
     * 排序
     */
    @Column(comment = "排序")
    private Integer sort;


    /**
     * 状态
     */
    @Column(comment = "状态 1.正常 -1.删除")
    private Integer status;

    /**
     * 开始时间
     */
    @Column(comment = "开始时间")
    private LocalDate startDate;

    /**
     * 结束时间
     */
    @Column(comment = "结束时间")
    private LocalDate endDate;


    /**
     * 图文描述
     */
    @Column(comment = "图文描述",length = 1000)
    private String imgTextDesc;

    /**
     * 图文详情
     */
    @Column(comment = "图文详情",length = 1000)
    private String imgTextDetail;


    /**
     * 创建时间
     */
    @Column(comment = "创建时间")
    private LocalDateTime createDate;


    /**
     * 修改时间
     */
    @Column(comment = "修改时间")
    private LocalDateTime updateDate;

    /**
     * 操作人
     */
    @Column(comment = "操作人")
    private String operName;

    /**
     * 销量
     */
    @TableField(exist = false)
    private Integer saleCount;
}

